import axios from "axios";

const request = async (config) => {
  let data = "";
  await axios(config)
    .then((resp) => {
      data = resp.data;
    })
    .catch((err) => {
      // console.log(err);
    });
  return data;
};

const requestAll = async (config) => {
  let data = "";
  await axios(config)
    .then((resp) => {
      data = resp;
    })
    .catch((err) => {
      // console.log(err);
    });
  return data;
};

export { request, requestAll };
